{% extends "base.html" %}

{% block content %}
		<a href="/" class="back">&laquo; <span>ALL BLOG ENTRIES</span></a>
		<h1 id="page_title">{{ entry.title }}</h1>
		<div class="content">
			{{ entry.body|safe }}
		</div>
		{% if comments %} <!-- Only display this section if comments was declared -->
		<div class="comments">
			<h2 class="comment_header">{{ comments.count }} Comment{% ifnotequal comments.count 1%}s{% endifnotequal %}</h2>
			{% if comments.list  %} <!-- Returns false if there are no comments -->
			<ul class="comment_list">
				{% for comment in comments.list %} <!-- This is how you iterate through the posted comments -->
					<li class="comment_item">
						<div class="author">
							<span class="name">
							{% if comment.author_website %}
								<a href="{{ comment.author_website }}">{{ comment.author_name }}</a> said:
							{% else %}
								{{ comment.author_name }} said:
							{% endif %}
							</span>
						</div>
						<div class="date">
							{{ comment.submit_date }}
						</div>
						<div class="comment">{{ comment.comment|urlize|linebreaks }}</div>
					</li>
				{% endfor %}
			</ul>
			{% endif %}
			{% if comment_form %} <!-- Check if comment_form was passed to the template-->
				<h2>Submit a Comment</h2>
					{% include "comment_form.html" %} <!-- Include comment_form.html template (Also included in the EXAMPLES folder) -->
		  {% endif %}
		</div>
		{% endif %}
{% endblock %}
